package com.link2room.blaster.entity;

import com.link2room.common.entity.BaseEntity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by LN on 2017/6/28.14:55
 */
@Entity
@Table(name = "in_mail_base")
public class InMailBaseEntity extends BaseEntity {
    public enum InMailBaseEntity_{
        mailId
    }
    private String mailId;
    private String title;
    private String type;
    private String hasRead;
    private String hasDone;

    @Basic
    @Column(name = "mail_id")
    public String getMailId() {
        return mailId;
    }

    public void setMailId(String mailId) {
        this.mailId = mailId;
    }

    @Basic
    @Column(name = "title")
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Basic
    @Column(name = "type")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Basic
    @Column(name = "has_read")
    public String getHasRead() {
        return hasRead;
    }

    public void setHasRead(String hasRead) {
        this.hasRead = hasRead;
    }

    @Basic
    @Column(name = "has_done")
    public String getHasDone() {
        return hasDone;
    }

    public void setHasDone(String hasDone) {
        this.hasDone = hasDone;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        InMailBaseEntity that = (InMailBaseEntity) o;

        if (mailId != null ? !mailId.equals(that.mailId) : that.mailId != null) return false;
        if (title != null ? !title.equals(that.title) : that.title != null) return false;
        if (type != null ? !type.equals(that.type) : that.type != null) return false;
        if (hasRead != null ? !hasRead.equals(that.hasRead) : that.hasRead != null) return false;
        if (hasDone != null ? !hasDone.equals(that.hasDone) : that.hasDone != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = mailId != null ? mailId.hashCode() : 0;
        result = 31 * result + (title != null ? title.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (hasRead != null ? hasRead.hashCode() : 0);
        result = 31 * result + (hasDone != null ? hasDone.hashCode() : 0);
        return result;
    }
}
